package com.yingxin.yxerp.module.message.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yingxin.yxerp.module.message.entity.UserMessage;
import com.yingxin.yxerp.module.message.vo.req.UserMessageReadBatchReqVo;

/**
 * 用户消息 服务类
 * @author fanchao
 * @since 2022-03-21
 */

public interface IUserMessageService extends IService<UserMessage> {

    Integer countUnreadByReceiverId(String userId);

    UserMessage getCount(String userId);

    /**
     * 创建
     */
    void create(UserMessage message);

    void create(UserMessage message, String senderId, String receiverId);

    /**
     * 标记已读
     */
    void read( String id );

    /**
     * 批量标记已读
     */
    void readBatch(UserMessageReadBatchReqVo queryVo);

    /**
     * 全部已读
     */
    void allRead();

}
